<form id="rankaddfm" method="post" style="padding: 8px;">
    <table border="0" width="100%" cellspacing="1" cellpadding="5" class="formtable">
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel"  width="20%">名称：</td>
            <td width="80%"><input v-model="dataset.name" type="text" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入名称.." required="true"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel"  width="20%">积分最小值：</td>
            <td width="80%"><input type="text" v-model="dataset.min" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入积分最小值.." required="true"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel"  width="20%">积分最大值：</td>
            <td width="80%"><input type="text" v-model="dataset.max" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入积分最大值.." required="true"></td>
        </tr>
        <tr bgcolor="#FFFFFF">
            <td  class="tlabel"  width="20%">优惠比例：</td>
            <td width="80%"><input type="text" v-model="dataset.rate" class="forminput inputstyle validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入优惠比例.." required="true"> %</td>
        </tr>
    </table>
</form>
<script>
    var rankaddVm = new Vue({
        el: '#rankaddfm',
        data: {
            dataset: {},
        },
        methods: {
            submit: function () {
                $.post('/admin/members/rankincrease', rankaddVm.dataset, function (data) {
                    if (data.ret == 0) {
                        $.messager.show({
                            title: '提示',
                            msg: data.msg,
                            timeout: 3000,
                            showType: 'slide'
                        });
                        $('#rankaddfm').form('clear');
                        $("#rankdlg").dialog('close');
                        $("#rank").datagrid('reload');
                    } else {
                        $.messager.alert('提示', data.msg, 'warning');
                    }
                }, 'json');
            }
        }
    });
    $(function () {
        $('#rankaddsubmit').click(function () {
            rankaddVm.submit();
        });
    });
</script>
